package com.centaline.androidsalesblog.api.usercenter;

import com.android.volley.DefaultRetryPolicy;
import com.android.volley.RetryPolicy;
import com.centaline.androidsalesblog.api.UserCenterApi;
import com.centaline.androidsalesblog.constants.AppConstant;
import com.centaline.androidsalesblog.model.responseobject.CollectInfoChangeRo;
import com.centanet.framework.interfaces.IResponseListener;

/**
 * 收藏信息变化
 * Created by guilin on 16/3/30.
 */
public class CollectInfoChangeApi extends UserCenterApi<CollectInfoChangeRo> {

    private String changeType;

    public CollectInfoChangeApi(Class<?> tag, Class<CollectInfoChangeRo> aClass, IResponseListener<CollectInfoChangeRo> iResponseListener) {
        super(tag, aClass, iResponseListener);
    }

    public void setChangeType(String changeType) {
        this.changeType = changeType;
    }

    @Override
    protected void setParams() {
        resetParams();
        putParams("FirstIndex", 0);
        putParams("Count", 1000);
        putParams("UserId", AppConstant.UserId);
        putParams("CityCode", AppConstant.CityCode);
        putParams("IsDel", false);
        putParams("IsRead", "");
        putStringParams("ChangeType", changeType);
    }

    @Override
    protected String getPath() {
        return "CollectInfoChangeListRequest";
    }

    @Override
    protected RetryPolicy getRetryPolicy() {
        return new DefaultRetryPolicy(2500, 4, 1.0F);
    }
}